<?php
/**
 * TOP API: alibaba.alisports.passport.user.openlogin request
 * 
 * @author auto create
 * @since 1.0, 2016.07.04
 */
class AlibabaAlisportsPassportUserOpenloginRequest
{
	/** 
	 * 应用appkey
	 **/
	private $appkey;
	
	/** 
	 * 是否开发模式 0表示正式1表示测试
	 **/
	private $dev;
	
	/** 
	 * 用户来源，0:手淘频道页，1:支付宝频道页，2:阿里体育网站app，3协会网站app
	 **/
	private $getFrom;
	
	/** 
	 * 用户openid
	 **/
	private $openid;
	
	private $apiParas = array();
	
	public function setAppkey($appkey)
	{
		$this->appkey = $appkey;
		$this->apiParas["appkey"] = $appkey;
	}

	public function getAppkey()
	{
		return $this->appkey;
	}

	public function setDev($dev)
	{
		$this->dev = $dev;
		$this->apiParas["dev"] = $dev;
	}

	public function getDev()
	{
		return $this->dev;
	}

	public function setGetFrom($getFrom)
	{
		$this->getFrom = $getFrom;
		$this->apiParas["get_from"] = $getFrom;
	}

	public function getGetFrom()
	{
		return $this->getFrom;
	}

	public function setOpenid($openid)
	{
		$this->openid = $openid;
		$this->apiParas["openid"] = $openid;
	}

	public function getOpenid()
	{
		return $this->openid;
	}

	public function getApiMethodName()
	{
		return "alibaba.alisports.passport.user.openlogin";
	}
	
	public function getApiParas()
	{
		return $this->apiParas;
	}
	
	public function check()
	{
		
		RequestCheckUtil::checkNotNull($this->appkey,"appkey");
		RequestCheckUtil::checkNotNull($this->getFrom,"getFrom");
		RequestCheckUtil::checkNotNull($this->openid,"openid");
	}
	
	public function putOtherTextParam($key, $value) {
		$this->apiParas[$key] = $value;
		$this->$key = $value;
	}
}
